package edu.stanford.prpl.api;


public interface Directory<V> {

	/**
	 * Update entry for key in directory with new entry.
	 * 
	 * @param key
	 * @param entry
	 * @return
	 */
	boolean updateEntry(String key, V entry);

	/**
	 * Remove entry for key in directory.
	 * 
	 * @param key
	 * @return
	 */
	boolean removeEntry(String key);

	/**
	 * Get entry for key
	 * 
	 * @param key
	 * @return
	 */
	V getEntry(String key);

	/**
	 * Send heartbeat and any additional information.
	 * 
	 * @param key
	 * @param objects
	 * @return
	 */
	boolean sendHearbeat(String key, Object... objects);
}
